package com.ebeitech.doorapp.domain.dao;

import com.ebeitech.doorapp.db.CommonDBHelper;
import com.ebeitech.doorapp.db.DBChangeInterface;
import com.ebeitech.doorapp.db.dao.BaseDBDaoImpl;
import com.ebeitech.doorapp.domain.*;

/**
 * Created by alice on 2017/10/24.
 */
public class CrashInfoDao extends BaseDBDaoImpl<CrashInfo> implements DBChangeInterface {

	private static CrashInfoDao crashInfoDao;

	public static CrashInfoDao getInstance() {

		if(crashInfoDao == null || crashInfoDao.dbHelper == null){
			crashInfoDao = new CrashInfoDao();
		}
		return crashInfoDao;
	}

	public CrashInfoDao() {
		super(CommonDBHelper.getDBHelper(), CrashInfo.class);
		CommonDBHelper.addToDaoManager(this);
	}

	@Override
	public void DBChange() {
		crashInfoDao = null;
	}
}
